- Rewrote and reorganized BlitPixie.c almost entirely. Added C versions of the blitters that will 'do the right thing' when compiling for PowerPC. Of particular interest to those PPC fans is the use of double* (pointers to doubles) to blit 8 bytes worth of pixels at a time to take maximum advantage of the 64 bit wide bus on the PowerMacs.
- Added use counts to the Frames, and consequently removed the Boolean deleteFrames parameter from SWDisposeSprite.
- Added some experimental routines that compile the mask of a 'cicn' into 68k machine code that will blit 8 bit pixels from any source.
- Added optional kCompiledMask type to Frame.h to support compiled masks. This MaskType must be passed explicitly, it is not included in the definition of kFatMask.
- Changed #define SW_PASCAL to #define SW_FUNC. For backward compatibility SW_PASCAL is still maintained.
- Added SWCommonHeaders.h file which contains constants and macros used globally in the SpriteWorld sources.
- SWCreateSpriteFromCIconResource and SWCreateSpriteFromPictResource now automatically call SWSetSpriteFrameRange appropriately,
- A bug in SWCloneSprite wherein the frameArray was not being copied properly has been fixed.
- SWStdMaskDrawProc is now defunct and has been removed.
- The function SWRemoveAllSpritesFromLayer was added to SpriteLayer.c
- The function SWUpdateSpriteOffscreen was renamed to SWCheckIdleSpriteOverlap
- A bug in SWProcessSpriteWorld was fixed wherein the variable oldPoint was not being initialized properly, which would likely result in a sprite being drawn unnecessarily and perhaps other problems as well.
- The logic to wrap the frame index in SWProcessSpriteWorld was greatly simplified.
- The WorldDrawProcPtr type was created and put to use in the SpriteWorldRec.eraseDrawProc, and SpriteWorldRec.screenDrawProc fields. Changes to SWSetSpriteWorldEraseProc and SWSetSpriteWorldDrawProc were made, and a SWStdWorldDrawProc function was created to support this. Many of the changes to BlitPixie.c were made to support this as well.
- SWFastAnimateSpriteWorld and SWBlastAnimateSpriteWorld functions were added to SpriteWorld.c to take optimum advantage of BlitPixie and other non-QuickDraw blitters.
SWFastAnimateSpriteWorld is the same as SWAnimateSpriteWorld except that it assumes the sprite has no maskRgn thus avoiding a possible call to OffsetRgn(), and the rect alignment logic assumes 8 bit per pixel. SWBlastAnimateSpriteWorld is the same as SWFastAnimateSpriteWorld, except that it does not call the SpriteWorld's eraseDrawProc, or screenDrawProc but rather calls the function BlitPixieWorldDrawProc directly.
- The sprite processing logic in SWAnimateSpriteWorld (and SWFastAnimateSpriteWorld and SWBlastAnimateSpriteWorld as well) was made more efficient by building a temporary list of the active sprites in the first pass, which allows the third (and final) pass to avoid the redundant check. It also made checking for idle sprite overlap faster thus reducing the overhead of large inanimate sprites even further. The large red "SpriteWorld" sprite reduces the overall frame rate by only 2.5%, versus 10% in version 1.0b3.
- The current mmuMode is saved globally when SWEnterSpriteWorld is called, so that SWAnimateSpriteWorld, SWFastAnimateSpriteWorld, and SWBlastAnimateSpriteWorld can avoid a potentially unnecessary call to SwapMMUMode(); This could cause a problem should the user somehow switch the machine into 24bit mode after the call the SWEnterSpriteWorld was made, but this is highly unlikely.
- SWIsPointInSprite was added to Sprite.c
- The Rect comparison logic in SWIsSpriteInRect was cleaned up and made slightly more efficient.
- The Rect comparison logic in SWCollideSpriteLayer was cleaned up and made slightly more efficient. (copy & paste!)
- A bug in SWSetCurrentFrameIndex was fixed wherein the curFrameIndex was not being updated properly. This bug was also fixed in SWSetCurrentFrame, however this time it required a somewhat inefficient search to be performed to find the right index. For best performance call SWSetCurrentFrameIndex rather than SWSetCurrentFrame.
- All Frames now maintain an array of indexes to every scan line in the Frame allowing fast address calculation of a particular scan line. Thus avoiding a costly multiply instruction for each call to the BlitPixie routines.
- A bug in SWCreateFrameFromPictResource was fixed wherein the current GrafPort was not being preserved properly.
- Frames that are created with pixel masks (kPixelMask) are preprocessed to support a much faster blitting algorithm used in BlitPixieMask.
1.0b3 -- 6/20/93
- Added support for non-color quickdraw machines, and removed dependency on GWorlds. This resulted in changes too numerous to mention, mostly in Frame.c. The minimal system requirements for SpriteWorld to run now go too far back in time for me to grasp.
- The core animation engine does more rigorous checking as to whether a sprite needs to be drawn offscreen or not. This resulted in vast speed improvements in animations that had inactive sprites.
- Added two new sample games to the package. This games are incomplete, but serve to demonstrate several important concepts for the use of SpriteWorld in games.
- Added a maskType parameter to SWCreateFrameFromCIconResource, SWCreateFrameFromPictResource, SWCreateSpriteFromCIconResource, and SWCreateSpriteFromPictResource. This allows you to specify the type of mask you want the frames to use. The choices are a region mask, a pixel mask, both, or no mask at all.
- Added a SWSetPortToBackGround routine to make it easier to draw directly on the offscreen background area.
- Made several changes/improvements to color blitting code. Added BlitPixieMask, a custom masked blitter. Thanks Ben!
- SpriteTest now runs a test for 30 seconds, rather than for 1000 frames.
- SpriteTest now aborts the current test when the mouse button is clicked.
- SpriteTest now hides the menubar before running the test.
- SpriteTest now disables the BlitPixieMask menu item if the bit depth != 8.
- SpriteTest now does a preflight memory check.
1.0b2 -- 5/17/93
- Fixed a bug in SWAnimateSpriteWorld that caused artifacts to be left by sprites when running in bit depths less than 8.
- Cleaned up SpriteTest a bit. Added an alert to report the performance statistics.
- All the samples now do more stringent checking for the Color Quickdraw, AppleEvents, etc.
- Added a separate project file for the SpriteWorldDebugLib library.
There has been very little testing done on non-color quickdraw machines. Such machines are getting rarer around these parts. I have very limited access to a lone SE.
The 1.0b4 release has received very little testing, it is therefore in limited distribution at the moment. Please report any problems you encounter ASAP!
Most of the samples did not make it into the 1.0b4 release. The will be updated and released as soon as possible with the next version.
Simple - done as it needs to be.
SpriteTest - Some of the menus have been reorganized, though I'm not sure its for the better. The Compile… item under the Sprites menu will allow you to pick a file in which there are 'cicn' resources. It will then generate a 'PxCd' resource for each 'cicn' containing code cam be used as a kCompiledMask type of Frame in your Sprites. See the SpriteTest source code for more info. This feature is obviously still experimental, beware.